<form>
  <div class="modal-head">
    {{#if change}}
      <h2>{{t 'coding_rules.change_details'}}</h2>
    {{else}}
      <h2>{{t 'coding_rules.activate_in_quality_profile'}}</h2>
    {{/if}}
  </div>

  <div class="modal-body modal-body-select2">
    <div class="modal-error"></div>

    <table>
      <tr class="property">
        <th><h3>{{t 'coding_rules.quality_profile'}}</h3></th>
        <td>
          {{#if key}}
            {{name}}
          {{else}}
            <select id="coding-rules-quality-profile-activation-select">
              {{#each qualityProfiles}}
                <option value="{{key}}">{{name}}</option>
              {{/each}}
            </select>
          {{/if}}
        </td>
      </tr>
      <tr class="property">
        <th><h3>{{t 'severity'}}</h3></th>
        <td>
          <select id="coding-rules-quality-profile-activation-severity">
            {{#each severities}}
              <option value="{{this}}">{{t 'severity' this}}</option>
            {{/each}}
          </select>
        </td>
      </tr>
      {{#unless isCustomRule}}
      {{#each params}}
        <tr class="property">
          <th><h3>{{key}}</h3></th>
          <td>
            {{#eq type 'TEXT'}}
              <textarea class="width100" rows="3" name="{{key}}" placeholder="{{defaultValue}}">{{value}}</textarea>
            {{else}}
              {{#eq type 'BOOLEAN'}}
              <select name="{{key}}" value="{{value}}">
                <option value="{{defaultValue}}">{{t 'default'}}</option>
                <option value="true"{{#eq value 'true'}} selected="selected"{{/eq}}>{{t 'true'}}</option>
                <option value="false"{{#eq value 'false'}} selected="selected"{{/eq}}>{{t 'false'}}</option>
              </select>
              {{else}}
              <input type="text" name="{{key}}" value="{{value}}" placeholder="{{defaultValue}}">
              {{/eq}}
            {{/eq}}
            <div class="note">{{description}}</div>
            {{#if extra}}
              <div class="note">{{extra}}</div>
            {{/if}}
          </td>
        </tr>
      {{/each}}
      {{/unless}}
    </table>
  </div>

  <div class="modal-foot">
    <button id="coding-rules-quality-profile-activation-activate" {{#unless saveEnabled}}disabled="disabled"{{/unless}}>
      {{#if change}}{{t 'save'}}{{else}}{{t 'coding_rules.activate'}}{{/if}}
    </button>
    <a id="coding-rules-quality-profile-activation-cancel" class="action">{{t 'cancel'}}</a>
  </div>
</form>
